package com.jsn.sdklib

import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.os.PersistableBundle
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity


fun Context.toast(msg:String)=
    Toast.makeText(this,msg,Toast.LENGTH_LONG).show();

class SdkActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_sdk)
        val context: Context=this
        context.toast("sdklibactivity")
    }

    fun myFun(context: Context) {
        context.toast("Hello world!")
    }


    companion object{
        fun start(context: Context) {
            val intent = Intent(context, SdkActivity::class.java)
            //intent.putExtra(KEY_INTENT_ARGS, VALUE_BIND)
            context.startActivity(intent)
        }
    }
}